<%-- 
    Document   : MostrarHoteles
    Created on : 16-dic-2014, 0:52:39
    Author     : Marco
--%>

<%@page import="Beans.*"%>
<%@page import="java.util.LinkedList"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Mostrar Hoteles</title>
    </head>
    <style type="text/css">
                    body{
                        background-image: url("http://www.fondox.net/wallpapers/resoluciones/13/ciudad-de-nueva-york_1920x1200_304.jpg");
                        }
                        </style>
    <body>
        <TABLE id="results">
        
            <TR>
            <TD>Nombre</TD>
            <TD>Ciudad</TD>
            <TD>Clasificacion</TD>
            <TD>Foto</TD>
            </TR>
            <% LinkedList<Hotel> listaH = (LinkedList<Hotel>)request.getAttribute("ListaH");            
            for(Hotel h: listaH){
                request.setAttribute("FotoSel", h.getUnaFoto());
               out.println("<TR>");
               out.println("<TD>"+h.getNombre()+"</TD>");
               out.println("<TD>"+h.getUnaCiudad().getNombre()+"</TD>");
               out.println("<TD>"+h.getClasificacion()+"</TD>");
               out.println("<TD><IMG width=\"200\" height=\"200\" SRC=\""+request.getContextPath()+"/MostrarImg?id="+h.getIdHotel()+"\"/></TD>");
               out.println("</TR>");
            }
            %>
   </TABLE>
    </body>
</html>
